<template>
  <div class="home">
    <!-- 路由出口 因为home是my和find的父组件,所以要加路由出口-->
    <router-view></router-view>
    <van-tabbar
      route
      active-color="#e40137"
      inactive-color="#b4b4bd"
      placeholder
      v-if="$route.meta.needTab"
    >
      <van-tabbar-item>
        <span class="txt">公司</span>
        <template #icon>
          <i class="iconfont  f28">&#xe63d;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item>
        <span class="txt">刷题</span>
        <template #icon>
          <i class="iconfont f28">&#xe63f;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/home/find">
        <span class="txt">发现</span>
        <template #icon>
          <i class="iconfont f28">&#xe646;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/home/my">
        <span class="txt">我的</span>
        <template #icon>
          <i class="iconfont f28">&#xe645;</i>
        </template>
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data () {
    return {}
  }
}
</script>

<style lang="less" scoped>
.home {
  height: 100%;
  .txt {
    font-size: 10px;
    font-family: PingFangSC, PingFangSC-Regular;
    font-weight: 400;
    text-align: left;
    color: #b4b4bd;
    line-height: 14px;
    letter-spacing: 0px;
  }
  .f28 {
    font-size: 28px;
  }
}
</style>
